package com.cs.study.homework._0229;

public class Demo3 {
    public static void main(String[] args) {
        String s = "legendary";
        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if ( i % 2==0) {
                chars[i] = Character.toUpperCase(chars[i]);
            }
        }
        System.out.println(chars);
    }
}
